import numpy as np
import matplotlib.pyplot as plt

# 目标：绘制劳动力、就业人员、城镇就业人员饼图
plt.rcParams['font.sans-serif'] = 'SimHei'
plt.rcParams['axes.unicode_minus'] = False
data = np.load('./Data/2001-2019年劳动力与就业人员数据.npz',encoding='ASCII', allow_pickle=True)

columns = data['arr_0']
values = data['arr_1']
print(type(values))


label = ['绘制劳动力', '就业人员','城镇就业人员']
explode = [0.01, 0.01,0.01]
p = plt.figure(figsize=(6, 6), dpi=100)
plt.pie(values[-4, 1:4], explode=explode,labels=label, autopct='%1.1f%%')
plt.title('2016年绘制劳动力、就业人员、城镇就业人员饼图')
plt.show()
